package com.huawei;

/**
 * Created by Z-hong on 2024/7/25.
 */
import java.util.Scanner;
public class HJ103 {
    static int max=1;
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int count=sc.nextInt();
        int arr[]=new int[count];
        for (int i = 0; i < count; i++) {
            arr[i]=sc.nextInt();
        }
        for (int i = 0; i < arr.length; i++) {
            find(arr,i+1,i,1);
        }


        System.out.println(max);
    }
    public static void find(int arr[],int i,int j,int count){
        if(i>arr.length-1||j>arr.length-1){return;}
        if(arr[i]>arr[j]){
            find(arr, i+1, j, count);
            count++;
            max=Math.max(max,count);
            find(arr, i+1, i, count);
        }else{
            find(arr, i+1, j, count);
        }

    }
}
